home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / sysdeps / mach / hurd / errnos.h < prev    next >
C/C++ Source or Header  |  1994-05-12  |  13KB  |  267 lines

  1. /* This file generated by gawk manual/errno.texi ../mach/mach/message.h ../mach/mach/kern_return.h ../mach/mach/mig_errors.h ../mach/device/device_types.h.  */
  2.  
  3. /* The Hurd uses Mach error system 0x10, currently only subsystem 0. */
  4. #ifndef _HURD_ERRNO
  5. #define _HURD_ERRNO(n)    ((0x10 << 26) | ((n) & 0x3fff))
  6. #endif
  7.  
  8. #ifdef _ERRNO_H
  9.  
  10. enum __error_t_codes
  11. {
  12. #undef EDOM
  13. #undef ERANGE
  14.     EPERM           = _HURD_ERRNO (1),
  15. #define    EPERM           _HURD_ERRNO (1) /* Operation not permitted */
  16.     ENOENT          = _HURD_ERRNO (2),
  17. #define    ENOENT          _HURD_ERRNO (2) /* No such file or directory */
  18.     ESRCH           = _HURD_ERRNO (3),
  19. #define    ESRCH           _HURD_ERRNO (3) /* No such process */
  20.     EINTR           = _HURD_ERRNO (4),
  21. #define    EINTR           _HURD_ERRNO (4) /* Interrupted system call */
  22.     EIO             = _HURD_ERRNO (5),
  23. #define    EIO             _HURD_ERRNO (5) /* Input/output error */
  24.     ENXIO           = _HURD_ERRNO (6),
  25. #define    ENXIO           _HURD_ERRNO (6) /* Device not configured */
  26.     E2BIG           = _HURD_ERRNO (7),
  27. #define    E2BIG           _HURD_ERRNO (7) /* Argument list too long */
  28.     ENOEXEC         = _HURD_ERRNO (8),
  29. #define    ENOEXEC         _HURD_ERRNO (8) /* Exec format error */
  30.     EBADF           = _HURD_ERRNO (9),
  31. #define    EBADF           _HURD_ERRNO (9) /* Bad file descriptor */
  32.     ECHILD          = _HURD_ERRNO (10),
  33. #define    ECHILD          _HURD_ERRNO (10)/* No child processes */
  34.     EDEADLK         = _HURD_ERRNO (11),
  35. #define    EDEADLK         _HURD_ERRNO (11)/* Resource deadlock avoided */
  36.     ENOMEM          = _HURD_ERRNO (12),
  37. #define    ENOMEM          _HURD_ERRNO (12)/* Cannot allocate memory */
  38.     EACCES          = _HURD_ERRNO (13),
  39. #define    EACCES          _HURD_ERRNO (13)/* Permission denied */
  40.     EFAULT          = _HURD_ERRNO (14),
  41. #define    EFAULT          _HURD_ERRNO (14)/* Bad address */
  42.     ENOTBLK         = _HURD_ERRNO (15),
  43. #define    ENOTBLK         _HURD_ERRNO (15)/* Block device required */
  44.     EBUSY           = _HURD_ERRNO (16),
  45. #define    EBUSY           _HURD_ERRNO (16)/* Device busy */
  46.     EEXIST          = _HURD_ERRNO (17),
  47. #define    EEXIST          _HURD_ERRNO (17)/* File exists */
  48.     EXDEV           = _HURD_ERRNO (18),
  49. #define    EXDEV           _HURD_ERRNO (18)/* Invalid cross-device link */
  50.     ENODEV          = _HURD_ERRNO (19),
  51. #define    ENODEV          _HURD_ERRNO (19)/* Operation not supported by device */
  52.     ENOTDIR         = _HURD_ERRNO (20),
  53. #define    ENOTDIR         _HURD_ERRNO (20)/* Not a directory */
  54.     EISDIR          = _HURD_ERRNO (21),
  55. #define    EISDIR          _HURD_ERRNO (21)/* Is a directory */
  56.     EINVAL          = _HURD_ERRNO (22),
  57. #define    EINVAL          _HURD_ERRNO (22)/* Invalid argument */
  58.     EMFILE          = _HURD_ERRNO (23),
  59. #define    EMFILE          _HURD_ERRNO (23)/* Too many open files */
  60.     ENFILE          = _HURD_ERRNO (24),
  61. #define    ENFILE          _HURD_ERRNO (24)/* Too many open files in system */
  62.     ENOTTY          = _HURD_ERRNO (25),
  63. #define    ENOTTY          _HURD_ERRNO (25)/* Inappropriate ioctl for device */
  64.     ETXTBSY         = _HURD_ERRNO (26),
  65. #define    ETXTBSY         _HURD_ERRNO (26)/* Text file busy */
  66.     EFBIG           = _HURD_ERRNO (27),
  67. #define    EFBIG           _HURD_ERRNO (27)/* File too large */
  68.     ENOSPC          = _HURD_ERRNO (28),
  69. #define    ENOSPC          _HURD_ERRNO (28)/* No space left on device */
  70.     ESPIPE          = _HURD_ERRNO (29),
  71. #define    ESPIPE          _HURD_ERRNO (29)/* Illegal seek */
  72.     EROFS           = _HURD_ERRNO (30),
  73. #define    EROFS           _HURD_ERRNO (30)/* Read-only file system */
  74.     EMLINK          = _HURD_ERRNO (31),
  75. #define    EMLINK          _HURD_ERRNO (31)/* Too many links */
  76.     EPIPE           = _HURD_ERRNO (32),
  77. #define    EPIPE           _HURD_ERRNO (32)/* Broken pipe */
  78.     EDOM            = _HURD_ERRNO (33),
  79. #define    EDOM            _HURD_ERRNO (33)/* Numerical argument out of domain */
  80.     ERANGE          = _HURD_ERRNO (34),
  81. #define    ERANGE          _HURD_ERRNO (34)/* Numerical result out of range */
  82.     EAGAIN          = _HURD_ERRNO (35),
  83. #define    EAGAIN          _HURD_ERRNO (35)/* Resource temporarily unavailable */
  84. #define EWOULDBLOCK EAGAIN /* Operation would block */
  85.     EINPROGRESS     = _HURD_ERRNO (36),
  86. #define    EINPROGRESS     _HURD_ERRNO (36)/* Operation now in progress */
  87.     EALREADY        = _HURD_ERRNO (37),
  88. #define    EALREADY        _HURD_ERRNO (37)/* Operation already in progress */
  89.     ENOTSOCK        = _HURD_ERRNO (38),
  90. #define    ENOTSOCK        _HURD_ERRNO (38)/* Socket operation on non-socket */
  91.     EDESTADDRREQ    = _HURD_ERRNO (39),
  92. #define    EDESTADDRREQ    _HURD_ERRNO (39)/* Destination address required */
  93.     EMSGSIZE        = _HURD_ERRNO (40),
  94. #define    EMSGSIZE        _HURD_ERRNO (40)/* Message too long */
  95.     EPROTOTYPE      = _HURD_ERRNO (41),
  96. #define    EPROTOTYPE      _HURD_ERRNO (41)/* Protocol wrong type for socket */
  97.     ENOPROTOOPT     = _HURD_ERRNO (42),
  98. #define    ENOPROTOOPT     _HURD_ERRNO (42)/* Protocol not available */
  99.     EPROTONOSUPPORT = _HURD_ERRNO (43),
  100. #define    EPROTONOSUPPORT _HURD_ERRNO (43)/* Protocol not supported */
  101.     ESOCKTNOSUPPORT = _HURD_ERRNO (44),
  102. #define    ESOCKTNOSUPPORT _HURD_ERRNO (44)/* Socket type not supported */
  103.     EOPNOTSUPP      = _HURD_ERRNO (45),
  104. #define    EOPNOTSUPP      _HURD_ERRNO (45)/* Operation not supported */
  105.     EPFNOSUPPORT    = _HURD_ERRNO (46),
  106. #define    EPFNOSUPPORT    _HURD_ERRNO (46)/* Protocol family not supported */
  107.     EAFNOSUPPORT    = _HURD_ERRNO (47),
  108. #define    EAFNOSUPPORT    _HURD_ERRNO (47)/* Address family not supported by protocol family */
  109.     EADDRINUSE      = _HURD_ERRNO (48),
  110. #define    EADDRINUSE      _HURD_ERRNO (48)/* Address already in use */
  111.     EADDRNOTAVAIL   = _HURD_ERRNO (49),
  112. #define    EADDRNOTAVAIL   _HURD_ERRNO (49)/* Can't assign requested address */
  113.     ENETDOWN        = _HURD_ERRNO (50),
  114. #define    ENETDOWN        _HURD_ERRNO (50)/* Network is down */
  115.     ENETUNREACH     = _HURD_ERRNO (51),
  116. #define    ENETUNREACH     _HURD_ERRNO (51)/* Network is unreachable */
  117.     ENETRESET       = _HURD_ERRNO (52),
  118. #define    ENETRESET       _HURD_ERRNO (52)/* Network dropped connection on reset */
  119.     ECONNABORTED    = _HURD_ERRNO (53),
  120. #define    ECONNABORTED    _HURD_ERRNO (53)/* Software caused connection abort */
  121.     ECONNRESET      = _HURD_ERRNO (54),
  122. #define    ECONNRESET      _HURD_ERRNO (54)/* Connection reset by peer */
  123.     ENOBUFS         = _HURD_ERRNO (55),
  124. #define    ENOBUFS         _HURD_ERRNO (55)/* No buffer space available */
  125.     EISCONN         = _HURD_ERRNO (56),
  126. #define    EISCONN         _HURD_ERRNO (56)/* Socket is already connected */
  127.     ENOTCONN        = _HURD_ERRNO (57),
  128. #define    ENOTCONN        _HURD_ERRNO (57)/* Socket is not connected */
  129.     ESHUTDOWN       = _HURD_ERRNO (58),
  130. #define    ESHUTDOWN       _HURD_ERRNO (58)/* Can't send after socket shutdown */
  131.     ETIMEDOUT       = _HURD_ERRNO (59),
  132. #define    ETIMEDOUT       _HURD_ERRNO (59)/* Connection timed out */
  133.     ECONNREFUSED    = _HURD_ERRNO (60),
  134. #define    ECONNREFUSED    _HURD_ERRNO (60)/* Connection refused */
  135.     ELOOP           = _HURD_ERRNO (61),
  136. #define    ELOOP           _HURD_ERRNO (61)/* Too many levels of symbolic links */
  137.     ENAMETOOLONG    = _HURD_ERRNO (62),
  138. #define    ENAMETOOLONG    _HURD_ERRNO (62)/* File name too long */
  139.     EHOSTDOWN       = _HURD_ERRNO (63),
  140. #define    EHOSTDOWN       _HURD_ERRNO (63)/* Host is down */
  141.     EHOSTUNREACH    = _HURD_ERRNO (64),
  142. #define    EHOSTUNREACH    _HURD_ERRNO (64)/* No route to host */
  143.     ENOTEMPTY       = _HURD_ERRNO (65),
  144. #define    ENOTEMPTY       _HURD_ERRNO (65)/* Directory not empty */
  145.     EUSERS          = _HURD_ERRNO (66),
  146. #define    EUSERS          _HURD_ERRNO (66)/* Too many users */
  147.     EDQUOT          = _HURD_ERRNO (67),
  148. #define    EDQUOT          _HURD_ERRNO (67)/* Disc quota exceeded */
  149.     ESTALE          = _HURD_ERRNO (68),
  150. #define    ESTALE          _HURD_ERRNO (68)/* Stale NFS file handle */
  151.     EREMOTE         = _HURD_ERRNO (69),
  152. #define    EREMOTE         _HURD_ERRNO (69)/* Too many levels of remote in path */
  153.     ENOLCK          = _HURD_ERRNO (70),
  154. #define    ENOLCK          _HURD_ERRNO (70)/* No locks available */
  155.     ENOSYS          = _HURD_ERRNO (71),
  156. #define    ENOSYS          _HURD_ERRNO (71)/* Function not implemented */
  157.     EBACKGROUND     = _HURD_ERRNO (72),
  158. #define    EBACKGROUND     _HURD_ERRNO (72)/* Inappropriate operation for background process */
  159.     ED              = _HURD_ERRNO (73),
  160. #define    ED              _HURD_ERRNO (73)/* ? */
  161.     EGREGIOUS       = _HURD_ERRNO (74),
  162. #define    EGREGIOUS       _HURD_ERRNO (74)/* You really blew it this time */
  163.     EIEIO           = _HURD_ERRNO (75),
  164. #define    EIEIO           _HURD_ERRNO (75)/* Computer bought the farm */
  165.     EGRATUITOUS     = _HURD_ERRNO (76),
  166. #define    EGRATUITOUS     _HURD_ERRNO (76)/* Gratuitous error */
  167.  
  168.     /* Errors from <mach/message.h>.  */
  169.     EMACH_SEND_IN_PROGRESS          = 0x10000001,
  170.     EMACH_SEND_INVALID_DATA         = 0x10000002,
  171.     EMACH_SEND_INVALID_DEST         = 0x10000003,
  172.     EMACH_SEND_TIMED_OUT            = 0x10000004,
  173.     EMACH_SEND_WILL_NOTIFY          = 0x10000005,
  174.     EMACH_SEND_NOTIFY_IN_PROGRESS   = 0x10000006,
  175.     EMACH_SEND_INTERRUPTED          = 0x10000007,
  176.     EMACH_SEND_MSG_TOO_SMALL        = 0x10000008,
  177.     EMACH_SEND_INVALID_REPLY        = 0x10000009,
  178.     EMACH_SEND_INVALID_RIGHT        = 0x1000000a,
  179.     EMACH_SEND_INVALID_NOTIFY       = 0x1000000b,
  180.     EMACH_SEND_INVALID_MEMORY       = 0x1000000c,
  181.     EMACH_SEND_NO_BUFFER            = 0x1000000d,
  182.     EMACH_SEND_NO_NOTIFY            = 0x1000000e,
  183.     EMACH_SEND_INVALID_TYPE         = 0x1000000f,
  184.     EMACH_SEND_INVALID_HEADER       = 0x10000010,
  185.     EMACH_RCV_IN_PROGRESS           = 0x10004001,
  186.     EMACH_RCV_INVALID_NAME          = 0x10004002,
  187.     EMACH_RCV_TIMED_OUT             = 0x10004003,
  188.     EMACH_RCV_TOO_LARGE             = 0x10004004,
  189.     EMACH_RCV_INTERRUPTED           = 0x10004005,
  190.     EMACH_RCV_PORT_CHANGED          = 0x10004006,
  191.     EMACH_RCV_INVALID_NOTIFY        = 0x10004007,
  192.     EMACH_RCV_INVALID_DATA          = 0x10004008,
  193.     EMACH_RCV_PORT_DIED             = 0x10004009,
  194.     EMACH_RCV_IN_SET                = 0x1000400a,
  195.     EMACH_RCV_HEADER_ERROR          = 0x1000400b,
  196.     EMACH_RCV_BODY_ERROR            = 0x1000400c,
  197.  
  198.     /* Errors from <mach/kern_return.h>.  */
  199.     EKERN_INVALID_ADDRESS           = 1,
  200.     EKERN_PROTECTION_FAILURE        = 2,
  201.     EKERN_NO_SPACE                  = 3,
  202.     EKERN_INVALID_ARGUMENT          = 4,
  203.     EKERN_FAILURE                   = 5,
  204.     EKERN_RESOURCE_SHORTAGE         = 6,
  205.     EKERN_NOT_RECEIVER              = 7,
  206.     EKERN_NO_ACCESS                 = 8,
  207.     EKERN_MEMORY_FAILURE            = 9,
  208.     EKERN_MEMORY_ERROR              = 10,
  209.     EKERN_NOT_IN_SET                = 12,
  210.     EKERN_NAME_EXISTS               = 13,
  211.     EKERN_ABORTED                   = 14,
  212.     EKERN_INVALID_NAME              = 15,
  213.     EKERN_INVALID_TASK              = 16,
  214.     EKERN_INVALID_RIGHT             = 17,
  215.     EKERN_INVALID_VALUE             = 18,
  216.     EKERN_UREFS_OVERFLOW            = 19,
  217.     EKERN_INVALID_CAPABILITY        = 20,
  218.     EKERN_RIGHT_EXISTS              = 21,
  219.     EKERN_INVALID_HOST              = 22,
  220.     EKERN_MEMORY_PRESENT            = 23,
  221.  
  222.     /* Errors from <mach/mig_errors.h>.  */
  223.     EMIG_TYPE_ERROR         = -300, /* client type check failure */
  224.     EMIG_REPLY_MISMATCH     = -301, /* wrong reply message ID */
  225.     EMIG_REMOTE_ERROR       = -302, /* server detected error */
  226.     EMIG_BAD_ID             = -303, /* bad request message ID */
  227.     EMIG_BAD_ARGUMENTS      = -304, /* server type check failure */
  228.     EMIG_NO_REPLY           = -305, /* no reply should be sent */
  229.     EMIG_EXCEPTION          = -306, /* server raised exception */
  230.     EMIG_ARRAY_TOO_LARGE    = -307, /* array not large enough */
  231.     EMIG_SERVER_DIED        = -308, /* server died */
  232.     EMIG_DESTROY_REQUEST    = -309, /* destroy request with no reply */
  233.  
  234.     /* Errors from <device/device_types.h>.  */
  235.     ED_IO_ERROR             = 2500, /* hardware IO error */
  236.     ED_WOULD_BLOCK          = 2501, /* would block, but D_NOWAIT set */
  237.     ED_NO_SUCH_DEVICE       = 2502, /* no such device */
  238.     ED_ALREADY_OPEN         = 2503, /* exclusive-use device already open */
  239.     ED_DEVICE_DOWN          = 2504, /* device has been shut down */
  240.     ED_INVALID_OPERATION    = 2505, /* bad operation for device */
  241.     ED_INVALID_RECNUM       = 2506, /* invalid record (block) number */
  242.     ED_INVALID_SIZE         = 2507, /* invalid IO size */
  243.     ED_NO_MEMORY            = 2508, /* memory allocation failure */
  244.     ED_READ_ONLY            = 2509, /* device cannot be written to */
  245.  
  246. };
  247.  
  248. #define    _HURD_ERRNOS    77
  249.  
  250. /* User-visible type of error codes.  It is ok to use `int' or
  251.    `kern_return_t' for these, but with `error_t' the debugger prints
  252.    symbolic values.  */
  253. #ifdef __USE_GNU
  254. typedef enum __error_t_codes error_t;
  255. #endif
  256.  
  257. /* errno is a per-thread variable.  */
  258. #include <hurd/threadvar.h>
  259. #define errno    (*__hurd_errno_location ())
  260.  
  261. #endif /* <errno.h> included.  */
  262.  
  263. #if !defined (_ERRNO_H) && defined (__need_Emath)
  264. #define    EDOM            _HURD_ERRNO (33)/* Numerical argument out of domain */
  265. #define    ERANGE          _HURD_ERRNO (34)/* Numerical result out of range */
  266. #endif /* <errno.h> not included and need math error codes.  */
  267.